package app.auto.runner.func;
import android.app.Activity;
import android.content.Intent;
import android.view.View;

import app.auto.runner.base.action.ParamType;
import app.auto.runner.base.task.StringFormatTask;
import app.auto.runner.base.utility.ReadFileUtil;
import app.auto.runner.base.utility.ToastUtil;

/**
 * Created by admin on 2017/9/3.
 */
@ParamType(type = "start ui",desc = "启动界面")
public class Start extends StringFormatTask {


    public StringFormatTask with(Activity act) {
        return super.with(act);
    }

    @Override
    public Object run(View view, String... params) {
        String sdxml = ReadFileUtil.readsd(view.getContext(),params[0]);
        view.getContext().startActivity(new Intent().setClassName("com.huachu.design","app.auto.designer.view.RunActivity").putExtra("stringcontent",sdxml).putExtra("sdpath",params[0]));
        return "";
    }
}
